<?php
/**
 *
 * Class annotations handles annotation mapping of all php files found under the application folder
 * @author Paul
 *
 */
class annotations{

	protected $wa = array();

	/**
	 * 
	 * Parse Class file for annotations and class name
	 * @param String $file
	 */
	function parse($file){
		$a=file($file);
		$n = count($a);
		for($i=0; $i<$n; $i++){
			if ($a[$i]{0} == '#') {
				$wa['annotation'] = htmlentities($a[$i]);
			}
			if (substr($a[$i],0,5) == 'class')  {
				$c = explode(" ", htmlentities($a[$i]));
				$rC = explode("{",$c[1]);
				$wa['class'] =  $rC[0];
			}
		}
		return $wa;
	}
}
?>